const express = require('express');
const router = express.Router();
const orderController = require('../controllers/order');
const { verifyToken } = require('../middlewares/auth');

router.use(verifyToken);

router.post('/', orderController.createOrder);
router.get('/', orderController.getOrders);
router.get('/:id', orderController.getOrderById);
router.put('/:id/cancel', orderController.cancelOrder);

module.exports = router;    